package userObservers;

import org.OpenNI.CalibrationProgressEventArgs;
import org.OpenNI.CalibrationProgressStatus;
import org.OpenNI.IObservable;
import org.OpenNI.IObserver;

/**
 *
 * @author xvanek9
 */
public class CalibrationCompleteObserver implements IObserver<CalibrationProgressEventArgs> {

    @Override
    public void update(IObservable<CalibrationProgressEventArgs> io, CalibrationProgressEventArgs args) {
        if (args.getStatus() == CalibrationProgressStatus.OK){
            System.out.println("Starting tracking " + args.getUser());
        }else if (args.getStatus() == CalibrationProgressStatus.NO_USER){
            System.out.println("No user in the scene.");
        //not sure
        }else if (args.getStatus() == CalibrationProgressStatus.TIMEOUT_FAIL){
            System.out.println("Try to stand in standard position. Kinect can't track your bones");
        }
        System.out.println("Calibration done");
    }
    
}